NetworkInfo

data class NetworkInfo(val userID: String = "", val quality: NetworkQuality = NetworkQuality.EXCELLENT, val upLoss: Int = 0, val downLoss: Int = 0, val delay: Int = 0)

Network information

Overview

Data structure for network status information, containing user ID, network quality, packet loss rate and latency.

State Properties Overview

PropertyTypeDescription
userIDStringUser unique ID
qualityNetworkQualityNetwork quality
upLossIntUplink packet loss rate, range 0, 100
downLossIntDownlink packet loss rate, range 0, 100
delayInt{'Latency (unit': 'milliseconds)'}

Constructors

Link copied to clipboard
constructor(userID: String = "", quality: NetworkQuality = NetworkQuality.EXCELLENT, upLoss: Int = 0, downLoss: Int = 0, delay: Int = 0)

Properties

Link copied to clipboard
val delay: Int = 0

Latency (unit: milliseconds).

Link copied to clipboard
val downLoss: Int = 0

Downlink packet loss rate, range 0, 100.

Link copied to clipboard

Network quality.

Link copied to clipboard
val upLoss: Int = 0

Uplink packet loss rate, range 0, 100.

Link copied to clipboard

User unique ID.